var addString = function (str1, str2) {
    let len1 = str1.length - 1;
    let len2 = str2.length - 1;
    let res = [];
    let add = 0;
    while (len1 >= 0 || len2 >= 0 || add != 0) {
        let x = len1 >= 0 ? str1.charAt(len1) - '0' : 0;
        let y = len2 >= 0 ? str2.charAt(len2) - '0' : 0;
        let temp = x + y + add;
        res.push(temp % 10);
        add = Math.floor(temp / 10);
        len1--;
        len2--;
    }
    return res.reverse().join('');

}

// 大数相加

// let res = addNumber(111, 111)
// console.log(res);

var nums = 123456;

var array = nums.split("");
console.log(array);